// pages/membershipCard/membershipCard.js
Page({
  data: {
    navtop:"",
    img:""
  },
  onLoad(){
    const app =getApp()
    // 导航栏
    // 1.获取屏幕可使用宽度
    let windowWidth = wx.getSystemInfoSync().windowWidth;
    // 2.获取状态栏高度
    const statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
    //3.获取胶囊按钮位置信息
    const menuButton = wx.getMenuButtonBoundingClientRect();
    this.setData({
      navtop:menuButton.top
    })
    this.setData({
      img:app.globalData.headimg
    })
  },
  gitfor(){
    wx.navigateBack({
      delta: -1
    })
  },
  onShow(){
    this.getphone()
      },
      gitfor(){
        wx.navigateBack({
          delta: -1
        })
      },
      getphone(){
        const app =getApp()
        const that=this
        wx.request({
          url: 'https://dj.ifankui.com/api/usr/getProfile',
          method:"POST",
          header: {
            "Content-Type": "application/x-www-form-urlencoded"
          },
          data:{
            openid:app.globalData.openid
          },
          success(res){
            console.log(res);
            that.setData({
               xx:res.data.data
            })
            
          }
        })
      }
});